<template>
    <div class="singer-home">
        <!-- 导航栏 -->
        <van-nav-bar title="歌手信息" left-text="返回" left-arrow @click-left="onclickLeft()" fixed placeholder />
        <img :src="singer.singer_pic" alt="">
        <!--    标签页 -->
        <van-tabs v-model="active">
            <van-tab title="百科">
                <singer-intro :singeid="id"></singer-intro>
            </van-tab>
            <van-tab title="歌曲">
                <singer-song :singeid="id"></singer-song>
            </van-tab>
        </van-tabs>
    </div>
</template>
  
<script>
import SingerIntro from "@/components/singer/components/SingerIntro";
import SingerSong from "@/components/singer/components/SingerSong";
export default {
    name: "SingerHome",
    components: { SingerSong, SingerIntro },
    data() {
        return {
            active: 0,
            id: this.$route.params.id,
            singer: {}
        }
    },
    created() {
        this.singer = this.$store.state.singer
    },
    methods: {
        onclickLeft() {
            window.history.length > 1 ? this.$router.go(-1) : this.$router.push("/")
        }
    }
}
</script>
  
<style scoped>

</style>